import {request} from '@/utils/request/index.js'
const model = 'message'
const sms = {
	// 获取消息分页列表
	getListPage(params){
		return request({
			url: model + '/get-list-page',
			method: 'get',
			params
		})
	},
	
	// 消息详情
	getInfo(params){
		let param = new URLSearchParams(params).toString()
		return request({
			url: model + '/get-info?' + param,
			method: 'get',
			params: params
		})
	},
	
	// 发送消息
	sendMessage(data){
		return request({
			url: model + '/send-message',
			method: 'post',
			data
		})
	},
	
	// 标记已读消息
	signRead(data){
		return request({
			url: model + '/sign-read',
			type: 'post',
			data
		})
	}
}

export default sms